package com.xmut.mall.search.feign;

import com.xmut.mall.search.utils.RespBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient("mall-ware")
public interface WareFeignClient {

    @PostMapping("/ware/waresku/testFeign")
    RespBean testFeign(@RequestBody Map<String,Object> params);

    /**
     * 解锁库存
     * @param params
     * @return
     */
    @PostMapping("/ware/waresku/unLockStock")
    void unLockStock(@RequestBody Map<String,Object> params);

    @GetMapping("/ware/waresku/getSkuWareNumber/{skuId}")
    RespBean getSkuWareNumber(@PathVariable Long skuId);
}
